package com.et114.core.utility;

/*
 * Copyright (c) 2005 Allways, LLC. All rights reserved.
 * �������� 2005-11-24
 * ���ù����๹����
 */

import java.util.Map;

import org.apache.xmlbeans.impl.common.ConcurrentReaderHashMap;

/**
 *  Cache Pool�����࣬����ConcurrentReaderHashMap
 * @
 * <a href="SimpleCachePool.java.html"><b><i>View Source</i></b></a>
 *
 * @���� daomingw
 * @�汾 1.0
 */
public class SimpleCachePool {
	public static Object get(String id) {
		return _instance._get(id);
	}

	public static void put(String id, Object obj) {
		_instance._put(id, obj);
	}

	public static Object remove(String id) {
		return _instance._remove(id);
	}

	private SimpleCachePool() {
		_pool = new ConcurrentReaderHashMap(_SIZE);
	}

	private Object _get(String id) {
		return _pool.get(id);
	}

	private void _put(String id, Object obj) {
		_pool.put(id, obj);
	}

	private Object _remove(String id) {
		return _pool.remove(id);
	}

	private static SimpleCachePool _instance = new SimpleCachePool();

	private static int _SIZE = 100000;

	private Map _pool;

}